<?php

namespace app\api\controller\v2;

use app\api\logic\TaskLogic;
use app\common\controller\Api;
use app\common\model\Company;
use app\common\model\Favorite as FavoriteModel;
use app\common\model\zbtask\Zbtask;

/**
 * 会员接口
 */
class Favorite extends Api
{

    protected $noNeedLogin = [];
    protected $noNeedRight = '*';

    /**
     * 我的收藏
     */
    public function myFavorite() {
        $ids = FavoriteModel::where(['user_id' => UID])->column('task_id');
        $list = TaskLogic::instance()->where(['id'=> ['in', $ids]])->taskPages();


        $this->success('我的收藏', $list);
    }



}
